<!DOCTYPE html>
<html>

<head>
    <script src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title></title>
</head>

<body>
    this is a demo
    <script type="text/javascript">
    function getUrlValue(){
   				var res=location.search.toLowerCase();
				var qs = (res.length>0?res.substring(1):""),
				args={},
				items = qs.length?qs.split("&"):[],
				item = null,
				name = null,
				value = null,
				i=0,
				len = items.length;
				for(i=0;i<len;i++){
					item = items[i].split("=");
					name = decodeURIComponent(item[0]);
					value = decodeURIComponent(item[1]);
					if(name.length){
						args[name] = value;
					}
				}
				return args;
			};
    var args= getUrlValue();
    getOpenid(args.id,args.info);
    function getOpenid(code,info) {
        var dataJson={
            "id":code,
            "password":info.split("_")[1],
            "userName":info.split("_")[0]
        }
        $.ajax({
            url: "http://10.10.50.70:3000/userInfo/relevance",
            type: "post",
            dataType: "json",
            data:dataJson,
            success: succesFunc,
            error: errorFunc
        });

        function succesFunc(resquest) {
            console.log(resquest);
            alert("成功");

        }

        function errorFunc(resquest) {
            console.log(resquest)
        }
    }
    </script>
</body>

</html>
